from pyecharts import options as opts
from pyecharts.charts import Radar
from pyecharts.globals import ThemeType
radar = Radar(init_opts=opts.InitOpts(
width='600px', height='400px',
theme=ThemeType.ESSOS, page_title='雷达图'))
radar.add(series_name='某员工',data=[[90,60,75,85,95]],
linestyle_opts=opts.LineStyleOpts (color='red'))#设置配置项
radar.add_schema(
schema=[
opts.RadarIndicatorItem (name='管理能力', max_=100),
opts.RadarIndicatorItem(name='业务能力', max_=100),
opts.RadarIndicatorItem (name='组织能力', max_=100),
opts.RadarIndicatorItem(name='沟通能力', max_=100),
opts.RadarIndicatorItem (name='表达能力', max_=100),
],
center=['50%','60%'], #设置雷达图中心坐标
#设置分割线配置项，包括显示分割线和分割线颜色
splitline_opt=opts.SplitLineOpts(is_show=True,
linestyle_opts=opts.LineStyleOpts (color='grey')),#设置文本样式配置项中的文本颜色
textstyle_opts=opts.TextStyleOpts (color='black'),
)
#设置全局配置项
radar.set_global_opts(
title_opts=opts.TitleOpts(
title='某员工能力分析雷达图',pos_left='center'),
legend_opts=opts.LegendOpts(pos_right='35', pos_top='25'))
radar.render('例3——5.html')

